package com.example.webdriveddd.factory;

import com.example.webdriveddd.domain.User;
import com.example.webdriveddd.dto.UserDTO;
import org.springframework.stereotype.Service;

@Service
public class UserFactory {
    public User fromDTO(UserDTO userDTO){
        return User.newUser(userDTO.getUsername(), userDTO.getPassword());
    }
}
